-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Reserve square bracket syntax for ingest document flexible field access pattern #134172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reserve square bracket syntax for ingest document flexible field access pattern #134172
Conversation
|
Pinging @elastic/es-data-management (Team:Data Management) |
10454cf to
646405a
Compare
server/src/main/java/org/elasticsearch/ingest/IngestDocument.java
Outdated
Show resolved
Hide resolved
| * @param pathParts The tokenized field path to parse | ||
| * @return An array of Strings | ||
| */ | ||
| private static String[] parseFlexibleFields(String fullPath, String[] pathParts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it meaningful that this is named parseFlexibleFields, when the analogous method for classic mode is validateClassicFields? They're both just validating, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I heavily adapted this code from #133790 with the hope that I can rebase it on top of these changes with minimal heartburn. I think this is just the method name from that PR.
server/src/main/java/org/elasticsearch/ingest/IngestDocument.java
Outdated
Show resolved
Hide resolved
masseyke
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few minor questions, but LGTM.
…ss pattern (elastic#134172) Adds validation to field path parsing to ensure that no square brackets are used in the path when flexible mode is enabled. We plan to introduce array indexing syntax to flexible mode in the future (`a.b[1].c`), but only after it is more widely supported in the ingest node APIs. To ensure that users do not make a habit of using this reserved syntax going forward, we are reserving it to ensure that it remains unused until it is supported.
Adds validation to field path parsing to ensure that no square brackets are used in the path when flexible mode is enabled. We plan to introduce array indexing syntax to flexible mode in the future (
a.b[1].c), but only after it is more widely supported in the ingest node APIs. To ensure that users do not make a habit of using this reserved syntax going forward, we are reserving it to ensure that it remains unused until it is supported.